/*
 * Test.c
 *
 * Created: 15/03/2012 11:21:48
 *  Author: Dani
 */ 

#include <avr/io.h>
#include <avr/interrupt.h>
#include "lcd162.h"
#include "switch.h"
#include "engine.h"
#define F_CPU 8000000
#include <util/delay.h>

unsigned char running = 1;
unsigned char speed = 0;

void DriversInit()
{
	EngineInit();
	SwitchInit();
	//LCDInit();	
	
	sei();
}

int main(void)
{
	DriversInit();
	
	//LCDDispString("Welcome");
	//_delay_ms(500);
	
	EngineControl(2,SPEED_25);
		
	while(1)
    {
      
	}			
}

ISR(S1) // S1
{
	EngineControl(2,SPEED_0)		;
}

ISR(S2) // S2
{
	EngineControl(2,192);
}